% igetbb.m
% converts a,b, and x vectors and sig to bb.
% bb already initialized.  (= zeros(k,1))
% bb = [a_1, a_2, ... a_ka, b_1, b_2, ... b_kb, x1, ... x_kx, sig]

for q=1:ka,
  bb(q) = a(q);
end;

for q=(ka+1):(ka+kb),
  bb(q) = b(q-ka);
end;

for q=(ka+kb+1):(ka+kb+kx),
  bb(q) = x(q-ka-kb);
end;

bb(k) = sig;
